Transform coding has proven to be an efficient means of coding a still image signal for transmission to a remote receiver.
In accordance with a basic transform image coding algorithm, a still image is divided into blocks of pixels. For example, each block of pixels may be a 16.times.16 block. Each block of pixels undergoes a two-dimensional orthogonal transform to produce a two-dimensional array of transform coefficients. For still image coding applications, the discrete cosine transform has emerged as the best orthogonal transform from the point of view of image compression and ease of implementation.
After a block of pixels undergoes a transform such as a discrete cosine transform, the resulting transform coefficients are subject to compression by thresholding and quantization. Thresholding involves setting all coefficients whose magnitude is smaller than a threshold value T equal to zero. In some thresholding processes, when a coefficient has a magnitude greater than T, T is subtracted if the coefficient is positive and T is added if the coefficient is negative. The DC transform coefficient may be excluded from the thresholding process. Quantization involves scaling a coefficient by a step size Q and rounding off to the nearest integer.
After compression, the compressed transform coefficients are then coded, for example, using a Huffman code, to form a bit stream for transmission to a remote receiver. At the receiver, an inverse process occurs to reconstruct the original block pixels. Thus, the received bit stream is decoded and the received quantized transform coefficients are expanded by the quantization step size. An inverse transform such as an inverse discrete cosine transform is then applied to the transform coefficients to reconstruct the block of pixels. In this manner, an image is transmitted block by block from a transmitter to a receiver.
In the conventional transform coding algorithm described above, the parameters of importance are the block size, the threshold value T, and the quantization step size Q. The conventional transform coding algorithm uses fixed parameters for all blocks from an image, i.e., the block size, threshold value T and quantization step size Q remain constant for all blocks within an image and from image to image.
The drawback of using fixed parameters is that the bit rate and image quality cannot achieve their best trade-off for a wide variety of images. Higher image quality is obtained at the price of higher bit rate for those busy image areas where the same visual quality may be achieved at a lower bit rate with another set of parameters.
To yield a better tradeoff between the bit rate and image quality, the parameters used in the transform coding algorithm have to be adaptive to the image contents. This motivates an adaptive transform coding approach for still images, where higher image quality can be obtained at a lower average bit rate (see e.g., W. H. Chen et al, "Scene Adaptive Coder", IEEE Trans. Commun., Vol COM-32, pp 225-232, March 1984; N. Texier et al "Hybrid Transform Video Coding Scheme for Low Bit Rate: An Improvement of the Reference Algorithm", Proc. Picture Coding Symp. pp. 8.4-1-2, Turin, Italy, September 1988).
In the above-identified patent application, an adaptive transform coding algorithm is disclosed which utilizes an adaptive threshold value T and an adaptive quantization step size Q along with a fixed block size. In particular, the compression parameters Q and T are selected individually for each block of pixels. In general, smaller (larger) compression parameters result in higher (lower) bit rates and image quality. Thus, large compression parameters are used for busy blocks where the human visual system is not very sensitive to degradation and small compression parameters are used for smooth blocks where the human visual system to degradation.
Illustratively, a measure of the busyness of a block is the magnitude of the (K+1).sup.th most significant transform coefficient, where K is an integer which remains the same for all blocks in an image or in a plurality of images. The magnitude of the (K+1).sup.th most significant transform coefficient is used to determine the threshold value T and quantization step size Q individually for each block of pixels. The magnitude of the (K+1).sup.th transform coefficient is large for busy blocks where the human visual system is not sensitive to degradation and results in large compression parameters and lower bit rates. On the other hand, for smooth blocks, the transform coefficients fall off rapidly, and the magnitude of the (K+1).sup.th transform coefficient is small resulting in small compression parameters and higher bit rates. In comparison to the conventional transform coding algorithm, the adaptive transform coding algorithm described above provides more consistent image quality and lower average bit rate for a wide variety of images.
It is an object of the present invention to provide an alternative adaptive transform coding algorithm wherein adaptivity is achieved by varying the pixel block size according to image contents.
In particular, a larger pixel block size advantageously results in better compression because more pixels are provided for decorrelation in the transform process. However, an inherent disadvantage of a large block size is that the quality of the resulting reconstructed image is not consistent amongst various images or from block to block within a single image. For example, blocking and ringing artifacts are more visible in a reconstructed image where a relatively larger pixel block size is used if the image contains high contrast edges. On the other hand, small pixel block size enables less compression but better quality of the reconstructed image.
Therefore, it is a further object of the present invention to provide an adaptive transform coding algorithm which takes advantage of the compression capability of large block size and the high visual image quality of small block size by choosing the appropriate block size according to the image contents so as to achieve a better tradeoff between bit rate and image quality.